/*
 * @Title: 
 * @Created by: ycq
 */
<template>
	<view class="">
		<view class="mask" @click="close"></view>
		<view class="Popup">
			<text class="popup-title">{{popupText}}</text>
			<view class="popup-right" @click="toXingcheng">
				<text>去查看</text>
				<!-- #ifdef APP-PLUS|| MP-WEIXIN -->
				<uni-icon type="arrowright" style='margin-top: 28upx;'  size="20" color="#ffffff"></uni-icon>
				<!-- #endif -->
				<!-- #ifndef APP-PLUS|| MP-WEIXIN -->
				<uni-icon type="arrowright"  size="20" color="#ffffff"></uni-icon>
				<!-- #endif -->
				
			</view>
		</view>
	</view>
</template>

<script>
	import uniIcon from '@/components/uni-icon/uni-icon'
	export default{
		props:{
			config:{
				type: Object,
				default: function() {
					return {
						text:'已添加到行程',
						url:'/pages/gonglue/glTabbar',
					}
				}
			}
		},
		data(){
			return{
				popupText:"已添加到行程"
			}
		},
		methods: {
			close(){
				this.$store.commit('showAddCussUpdate',{show:false})
			},
			toXingcheng(){
				this.$store.commit('showAddCussUpdate',{show:false})
				this.$store.commit('tabIndexUpdata',3);
					uni.navigateTo({
						url:this.config.url
					})
			}
		},
		created(){
			this.popupText = this.$store.state.showAddCuss.text
			setTimeout(() => {
				this.close()
			}, 3000);
		},
		components:{
			uniIcon
		}
	}
</script>

<style scoped>
	.mask{
		width: 100%;
		height: 100vh;
		position: fixed;
	}
	.Popup{
		opacity: 0.7;
		width: 700upx;
		height: 100upx;
		left: 25upx;
		bottom: 130upx;
		background: rgba(0,0,0,0.8);
		border-radius: 20upx;
		position: fixed;
		color: #FFFFFF;
		z-index: 1000;
	}
	.popup-title{
		line-height: 100upx;
		float: left;
		padding-left: 30upx;
		font-size: 28upx;
	}
	.popup-right{
		line-height: 100upx;
		float: right;
		height: 100upx;
		font-size: 28upx;
		display: flex;
		flex-direction: row;
		padding-right: 30upx;
	}
</style>
